//
//  CTMediator+SouFunJRAPP.m
//  SouFunRouter
//
//  Created by 许博 on 16/5/20.
//  Copyright © 2016年 许博. All rights reserved.
//

#import "CTMediator+SouFunJRAPP.h"


NSString * const kSouFunMediatorTargetJRAPP = @"SouFunJRAPP";
NSString * const kSouFunMediatorActionNativeFetchSouFunJRControllerr = @"nativeFetchSouFunJRController";

NSString *const kSouFunMediatorActionnativePresentResult = @"nativePresentResult";
// 写错了key所以报错

NSString *const kSouFunMediatorActionnativePresentResultWithBlock = @"nativePresentResultWithBlock";

@implementation CTMediator (SouFunJRAPP)
- (UIViewController *)SouFunMediator_viewControllerForSouFunJRAPP:(NSString *)title {
    UIViewController *vc = [self performTarget:kSouFunMediatorTargetJRAPP action:kSouFunMediatorActionNativeFetchSouFunJRControllerr params:@{@"key":title}];
    return vc; //暂时没有加容错
}

- (id)SouFunMediator_presentResultWithNum1:(NSString *)number1 Num2:(NSString *)number2 {
    
    UIViewController *vc = [self performTarget:kSouFunMediatorTargetJRAPP action:kSouFunMediatorActionnativePresentResult params:@{@"num1":number1,@"num2":number2}];
    return vc;
}



- (id)SouFunMediator_presentResultWithBlock:(returnResultBlcok)resultBlock {
    UIViewController *vc = [self performTarget:kSouFunMediatorTargetJRAPP action:kSouFunMediatorActionnativePresentResultWithBlock params:@{@"block":resultBlock}];
    return vc;

}
@end
